package com.qzdsoft.erpcloud.service.proj;

import java.util.List;

import com.qzdsoft.erpcloud.domain.proj.Bom;
import com.qzdsoft.erpcloud.domain.proj.BomItem;
import com.qzdsoft.erpcloud.domain.sys.LoginUser;
import com.qzdsoft.erpcloud.vo.proj.BomDetailEditInfo;
import com.qzdsoft.erpcloud.vo.proj.BomInfo;
import com.qzdsoft.erpcloud.vo.proj.BomItemInfo;
import com.qzdsoft.erpcloud.vo.proj.BomQueryInfo;
import com.qzdsoft.vo.LayTableResponse;
import com.qzdsoft.vo.Response;

/**
 * Author:ZhangHao
 * 
 */
public interface BomService {
	//根据ID 获取一条记录
	Bom getById(Integer id);
//***************************CRUD Author: ZhangHao**********************************//	
	//新增存货事件
	Response<String> addBom(Bom bom, LoginUser loginUser) throws Exception;
	//编辑保存
	Response<String> editBom(Bom bom, LoginUser loginUser);
	//删除存货
	Response<String> delteBom(Integer id, LoginUser loginUser);
	//BOM子件更新
	Response<String> editChildBom(BomItem bomchild, LoginUser loginUser);
	
	String getChildByBomId(int rows, int page,int bomId);
	
	Response<String> delteBomItem(Integer id, LoginUser loginUser);
	//根据子件Id 获取唯一一条数据
	BomItem getItemById(Integer id);
	//BOM子件新增
	Response<String> addChildBom(BomItem childbom, LoginUser loginUser);
	//删除整个BOM
	Response<String> delBomById(Integer id, LoginUser loginUser);
	//BOM 网格数据源
    LayTableResponse<BomInfo> findPage(int page, int limit);
    //根据父件BOMID 获取BOM的视图信息  
    BomInfo getBomById(Integer id);
    //BOM审核
    Response<String> audtById(Integer id, LoginUser loginUser);
    //BOM弃审
    Response<String> unAudtById(Integer id, LoginUser loginUser);
    //根据查询条件过滤BOM
    LayTableResponse<BomInfo> findPageByItems(BomQueryInfo search);
    //根据BOM ID查询所有的子件信息
    List<BomItemInfo> getBomChildByBomId(int bomId,BomQueryInfo queryinfo);
    //BOM子件新增 修改、保存
    Response<String> bomitemedit(BomDetailEditInfo info);
    //根据IDs 删除  bom子件
    Response<String> removebomitem(List<Integer> ids);
}
